import 'package:flutterproject/generated/json/base/json_convert_content.dart';
import 'package:flutterproject/page/quota/data/quota_bean.dart';

QuotaBean $QuotaBeanFromJson(Map<String, dynamic> json) {
	final QuotaBean quotaBean = QuotaBean();
	final List<QuotaList>? list = jsonConvert.convertListNotNull<QuotaList>(json['list']);
	if (list != null) {
		quotaBean.list = list;
	}
	return quotaBean;
}

Map<String, dynamic> $QuotaBeanToJson(QuotaBean entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['list'] =  entity.list?.map((v) => v.toJson()).toList();
	return data;
}

QuotaList $QuotaListFromJson(Map<String, dynamic> json) {
	final QuotaList quotaList = QuotaList();
	final String? symbol = jsonConvert.convert<String>(json['symbol']);
	if (symbol != null) {
		quotaList.symbol = symbol;
	}
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		quotaList.code = code;
	}
	final double? latestPrice = jsonConvert.convert<double>(json['latestPrice']);
	if (latestPrice != null) {
		quotaList.latestPrice = latestPrice;
	}
	final double? changeRate = jsonConvert.convert<double>(json['changeRate']);
	if (changeRate != null) {
		quotaList.changeRate = changeRate;
	}
	return quotaList;
}

Map<String, dynamic> $QuotaListToJson(QuotaList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['symbol'] = entity.symbol;
	data['code'] = entity.code;
	data['latestPrice'] = entity.latestPrice;
	data['changeRate'] = entity.changeRate;
	return data;
}